/**
* User: Oleksii Savchenko
* Date: 23.01.13
* Time: 14:31
*/

var navigation = {
    /**
     * made redirect bu Url
     * @param url
     * @return reloaded page
     */
    goToPage: function(url){
       return this._setProperty(window.location, 'href', url);
    },

    /**
     * collects an object
     * assigned to object a value
     * @param obj
     * @param key
     * @param value
     * @private
     */
    _setProperty: function(obj, key, value){
        if (value === undefined){
            throw new Error();
        } else if (value === null){
            throw new Error();
        }

        obj[key] = value;
    }
};